package com.ruoyi.logistic.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.NetworkBillPayable;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.vo.NetworkBillPayableVo;
import com.ruoyi.logistic.mapper.NetworkBillPayableMapper;
import com.ruoyi.logistic.service.NetworkBillPayableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Date;
import java.util.List;
@Service
public class NetworkBillPayableServiceImpl implements NetworkBillPayableService {
    @Autowired
    private NetworkBillPayableMapper networkBillPayableMapper;
    @Override
    public List<NetworkBillPayable> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkBillPayableMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkBillPayable networkBillPayable) {
        return networkBillPayableMapper.insert(networkBillPayable);
    }

    @Override
    public Boolean update(NetworkBillPayable networkBillPayable) {
        return networkBillPayableMapper.update(networkBillPayable);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkBillPayableMapper.deleteById(id);
    }

    @Override
    public NetworkBillPayable findById(Integer id) {
        return networkBillPayableMapper.findById(id);
    }

    @Override
    public List<NetworkBillPayable> search(NetworkBillPayableVo networkBillPayableVo) {
        PageHelper.startPage(networkBillPayableVo.getPageDate());
        return networkBillPayableMapper.search(networkBillPayableVo);
    }

}
